package com.hxalex.simulationhandle.accessbilityService.command.wifi;

import android.view.accessibility.AccessibilityNodeInfo;

import com.hxalex.simulationhandle.accessbilityService.command.base.BaseCommand;
import com.hxalex.simulationhandle.accessbilityService.manger.WifiManger;
import com.hxalex.simulationhandle.accessbilityService.receiver.base.BaseReceiver;
import com.hxalex.simulationhandle.accessbilityService.receiver.wifi.SearchWifiReceiver;

/**
 * Created by hx_Alex on 2018/5/26.
 */

public class SearchWifiCommand extends BaseCommand {
    
    private AccessibilityNodeInfo nowInfo;

    public SearchWifiCommand(WifiManger wifiManger, BaseReceiver receiver) {
        super(wifiManger, receiver);
    }


    public AccessibilityNodeInfo getNowInfo() {
        return nowInfo;
    }

    public void setNowInfo(AccessibilityNodeInfo nowInfo) {
        this.nowInfo = nowInfo;
    }

    @Override
    public void execute() {
        SearchWifiReceiver searchWifiReceiver=(SearchWifiReceiver)  receiver;
        ((SearchWifiReceiver) receiver).setNowInfo(nowInfo);
        searchWifiReceiver.doSomething();
    }
}
